#include "names.h"
#include <iostream>
using namespace std;
namespace pers {
void getperson(person &ret) {
  cout << "请输入第一个名称：";
  cin >> ret.fname;
  cout << "请输入第二个名称：";
  cin >> ret.lname;
}
void showperson(const person &ret) {
  cout << ret.fname << ":" << ret.lname << endl;
}
} // namespace pers

namespace debts {
void getdebt(debt &ret) {
  getperson(ret.name);
  cout << "请输入 amount:";
  cin >> ret.amount;
}
void showdebt(const debt &ret) {
  showperson(ret.name);
  cout << ":$" << ret.amount << endl;
}
double sumdebt(const debt arr[], int n) {
  double total = 0;
  for (int i = 0; i < n; i++) {
    total += arr[i].amount;
  }
  return total;
}
} // namespace debts
